<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 判断一年是否是闰年
        var year = 2000;
        if ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0) ) {
            document.write(year + "是闰年");
        }
    </script>
</body>

</html>